package org.mwielocha.jxcube.ut;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

public abstract class PropertyHelper {
  
  protected PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
  
  public void addPropertyChangeListener(PropertyChangeListener l) {
    propertyChangeSupport.addPropertyChangeListener(l);
  }
  
  public void addPropertyChangeListener(String propertyName, PropertyChangeListener l) {
    propertyChangeSupport.addPropertyChangeListener(propertyName, l);
  }
  
  public void removePropertyChangeListener(PropertyChangeListener l) {
    propertyChangeSupport.removePropertyChangeListener(l);
  }
  
  public void removePropertyChangeListener(String propertyName, PropertyChangeListener l) {
    propertyChangeSupport.removePropertyChangeListener(propertyName, l);
  }
}
